package ywh.event
{
	import ywh.player.av.IAudioHandle;
	
	import flash.events.Event;
	
	/**
	 * 音频事件类
	 * @author WilliWHYang
	 */
	public class AudioEvent extends Event
	{
		/**
		 * 设置音量
		 */
		public static const SET_VOLUME:String = "set volume";
		/**
		 * 设置静音
		 */
		public static const TOGGLE_MUTE:String = "toggle mute";
		private var _media:IAudioHandle;
		
		public function AudioEvent(type:String, media:IAudioHandle)
		{
			super(type, false, false);
			_media = media;
		}
		
		public override function clone():Event
		{
			return new AudioEvent(type, _media);
		}
		
		public override function toString():String
		{
			return formatToString("AudioEvent", "type", "media", "bubbles", "cancelable", "eventPhase");
		}
		
		public function get media():IAudioHandle
		{
			return _media;
		}
	
	}

}